<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="main">
        <div>1</div>
        <div>2</div>
        <div>3</div>
    </div>
    <script>
        /**
         * innerHTML属性, 返回子树(string类型)
         * 设置innerHTML属性会替换原来的子树
        */

        const main = document.getElementById("main")

        console.log(typeof main.innerHTML) // main子树

        main.innerHTML = '<h1>Hello Vue3</h1>' // 子树被替换
    </script>
</body>
</html>